Skip to content

Conversation

@partylikeits1983
Copy link
Contributor

No description provided.

@bobbinth bobbinth changed the title Agglayer tracking PR Agglayer bridging tracking PR Nov 24, 2025
partylikeits1983 and others added 20 commits December 11, 2025 10:30
…erBridgeOut` contract -> `BURN` note (#2023)

* feat: stubbed out B2AGG note & bridge out functionality

* feat: create BURN note during B2AGG consumption

* feat: stub out mmr_frontier for bridgeout

* refactor: add padding comments to B2AGG note

* refactor: cleanup B2AGG notescript implementation

* Update crates/miden-lib/asm/agglayer/note_scripts/B2AGG.masm

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* refactor: update B2AGG note doc comments

* Update crates/miden-lib/asm/agglayer/account_components/bridge_out.masm

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update crates/miden-testing/tests/agglayer/bridge_out.rs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* refactor: clean up test logic

* feat: implement ntx faucet tag in masm & compute BURN serial_num

* refactor: make BURN note inputs a constant

* fix: fix docs CI

* feat: hash b2agg note details using keccak256

* feat: add comments to bridge out component procedures

* feat: add B2AGG reclaim test

* fix: clippy warning

* Update crates/miden-lib/asm/agglayer/account_components/bridge_out.masm

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update crates/miden-lib/asm/agglayer/account_components/bridge_out.masm

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update crates/miden-lib/asm/agglayer/account_components/bridge_out.masm

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Revert "Update crates/miden-lib/asm/agglayer/account_components/bridge_out.masm"

This reverts commit 733883d.

* refactor: cleanup build.rs updates

* refactor: remove  added comment from build.rs

* feat: use build_note_tag_for_network_account in bridge_out component

* refactor: update procedure comment

* Update crates/miden-lib/asm/agglayer/account_components/bridge_out.masm

Co-authored-by: Marti <marti@miden.team>

* Update crates/miden-lib/asm/agglayer/account_components/bridge_out.masm

Co-authored-by: Marti <marti@miden.team>

* Update crates/miden-lib/asm/agglayer/account_components/bridge_out.masm

Co-authored-by: Marti <marti@miden.team>

* Update crates/miden-lib/asm/agglayer/account_components/bridge_out.masm

Co-authored-by: Marti <marti@miden.team>

* refactor: rm convert_b2agg_to_u32 & use store_word_u32s_le

* fix: spelling in masm comment

* fix: rm debug mode from build.rs

* refactor: rm unused imports in bridge_out

* fix: update doc comment

* refactor: import std::word

* refactor: use swapw instead of padw in B2AGG

* refactor: rename B2AGG_NOTE_INPUTS_NUMBER to B2AGG_NOTE_INPUTS_COUNT

* refactor: address stack comments & optimize cycles

* refactor: add B2AGG input comments

* refactor: update B2AGG input comments & stack layout

* refactor: fix stack state before note::build_note_tag_for_network_account

* refactor: modularize agglayer bridge

* fix: rustfmt

* refactor: add add_asset_message procedure

* refactor: use different stack comment notation for B2AGG inputs

* refactor: modify B2AGG description doc comment

* Apply suggestions from code review

* Update crates/miden-lib/asm/agglayer/account_components/bridge_out.masm

Co-authored-by: Marti <marti@miden.team>

* refactor: add todo comments in masm

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Marti <marti@miden.team>
Co-authored-by: Andrey Khmuro <andrey@polygon.technology>
@bobbinth bobbinth added the no changelog This PR does not require an entry in the `CHANGELOG.md` file label Jan 15, 2026
partylikeits1983 and others added 3 commits January 15, 2026 16:35
* feat: add Solidity<>Miden address type conversion functions

* fix: formatting

* refactor: rm unnecessary indirection

* refactor: use crypto util functions

* refactor: implement suggestions & refactor

* refactor:  update logic & comments to little endian

* Update crates/miden-agglayer/src/utils.rs

Co-authored-by: igamigo <ignacio.amigo@lambdaclass.com>

* refactor: improve EthAddress representation clarity and MASM alignment

* refactor: simplify ethereum_address_to_account_id proc

* fix: clippy

* fix: lint doc check

* refactor: use u32assert2

* refactor: simplify from_account_id() & u32 check

* revert: undo drop addr4 in ethereum_address_to_account_id

* Update crates/miden-agglayer/src/eth_address.rs

Co-authored-by: Marti <marti@miden.team>

* refactor: rename to EthAddressFormat

* refactor: rearrange EthAddressFormat

* refactor: rename file to eth_address_format

* fix: update script roots

* refactor: update test & refactor

* refactor: refactor .to_elements() method

* refactor: rename to to_account_id

* fix: lint check

* refactor: rename to eth_address.rs & undo Felt::try_from() changes

---------

Co-authored-by: igamigo <ignacio.amigo@lambdaclass.com>
Co-authored-by: Marti <marti@miden.team>
Co-authored-by: Bobbin Threadbare <43513081+bobbinth@users.noreply.github.com>
@bobbinth bobbinth marked this pull request as ready for review January 16, 2026 08:32
Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you!

As one of the follow-ups, I'd update the structure of the asm directory a bit. Specifically, I'd have something like this:

asm
├── agglayer
│   ├── bridge
│   │   ├── asset_conversion.masm
│   │   ├── bridge_in.masm
│   │   ├── bridge_out.masm
│   │   ├── crypto_utils.masm
│   │   ├── eth_address.masm
│   │   └── local_exit_tree.masm
│   ├── faucet
│   │   └── mod.masm
│   └── notes
│       ├── b2agg.masm
│       └── claim.masm
├── components
│   ├── bridge.masm
│   └── faucet.masm
└── notes
    ├── b2agg.masm
    └── claim.masm

Other arrangements are also possible - so, let's create an issue to discuss.

@mmagician mmagician merged commit 1781efa into next Jan 16, 2026
17 checks passed
@mmagician mmagician deleted the agglayer branch January 16, 2026 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agglayer no changelog This PR does not require an entry in the `CHANGELOG.md` file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants